<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>multivac</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >multiVAC</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;multivac
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="multivac-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
<h1 class="epydoc">Package multivac</h1><p class="nomargin-top"><span class="codelink"><a href="multivac-pysrc.html">source&nbsp;code</a></span></p>
<p>MultiVAC generic framework for building tree-based status 
  applications.</p>
  <p>This modules provides an implementation of a generic framework, called
  MultiVAC, for use in building applications working with trees of 
  elements, in which the status of a node derives from the status of the 
  leaves.</p>
  <p>Two classes are defined, one for each table in the relational model <a
  href="multivac.Element-class.html" class="link">Element</a>,  <a 
  href="multivac.Project-class.html" class="link">Project</a>. Also, two 
  additional classes are defined for the association relationships between 
  the former: <a href="multivac.TagElement-class.html" 
  class="link">TagElement</a> and <a href="multivac.TagProject-class.html" 
  class="link">TagProject</a>.</p>

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="multivac.CTENotSupported-class.html" class="summary-name">CTENotSupported</a><br />
      User-defined exception to warn the user when calling a method that 
      uses Common Table Expressions (CTE) to perform its work.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="multivac.ORM_Base-class.html" class="summary-name">ORM_Base</a><br />
      Base class for mapping the tables.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="multivac.Element-class.html" class="summary-name">Element</a><br />
      Mapping class for the table &#171;element&#187;.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="multivac.Project-class.html" class="summary-name">Project</a><br />
      Mapping class for the table &#171;project&#187;.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="multivac.TagElement-class.html" class="summary-name">TagElement</a><br />
      Mapping class for the table &#171;tagelement&#187;.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="multivac.TagProject-class.html" class="summary-name">TagProject</a><br />
      Mapping class for the table &#171;tagproject&#187;.
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="multivac-module.html#init" class="summary-sig-name">init</a>(<span class="summary-sig-arg">session_maker</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span><br />
      Initialize the db connection, set up the tables and map the classes.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="multivac-pysrc.html#init">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="setup_tables"></a><span class="summary-sig-name">setup_tables</span>()</span><br />
      Define the tables, columns, keys and constraints of the DB.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="multivac-pysrc.html#setup_tables">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="multivac-module.html#setup_mappers" class="summary-sig-name">setup_mappers</a>(<span class="summary-sig-arg">**kwargs</span>)</span><br />
      Define the mapping between tables and classes, and the relationships 
      that link them.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="multivac-pysrc.html#setup_mappers">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="setup_events"></a><span class="summary-sig-name">setup_events</span>(<span class="summary-sig-arg">session_maker</span>,
        <span class="summary-sig-arg">**kwargs</span>)</span><br />
      Define the events of the model.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="multivac-pysrc.html#setup_events">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_session_before_flush"></a><span class="summary-sig-name">_session_before_flush</span>(<span class="summary-sig-arg">session</span>,
        <span class="summary-sig-arg">flush_context</span>,
        <span class="summary-sig-arg">instances</span>)</span><br />
      Ensure that when an Element instance is deleted, the children 
      collection of its parent is notified to update and cascade the status
      change.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="multivac-pysrc.html#_session_before_flush">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="metadata"></a><span class="summary-name">metadata</span> = <code title="MetaData()">MetaData()</code><br />
      Metadata object for this model
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="tables"></a><span class="summary-name">tables</span> = <code title="{}">{}</code><br />
      Name-indexed dict containing the definition of every table
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="mappers"></a><span class="summary-name">mappers</span> = <code title="{}">{}</code><br />
      Name-indexed dict containing the mapper of every table
    </td>
  </tr>
</table>
<p class="indent-wrapped-lines"><b>Imports:</b>
  <span title="os">os</span>,
  <span title="sys">sys</span>,
  <span title="warnings">warnings</span>,
  <span title="sqlalchemy">sqlalchemy</span>,
  <span title="sqlalchemy.Column">Column</span>,
  <span title="sqlalchemy.MetaData">MetaData</span>,
  <span title="sqlalchemy.Table">Table</span>,
  <span title="sqlalchemy.Index">Index</span>,
  <span title="sqlalchemy.ForeignKeyConstraint">ForeignKeyConstraint</span>,
  <span title="sqlalchemy.PrimaryKeyConstraint">PrimaryKeyConstraint</span>,
  <span title="sqlalchemy.UniqueConstraint">UniqueConstraint</span>,
  <span title="sqlalchemy.Boolean">Boolean</span>,
  <span title="sqlalchemy.Integer">Integer</span>,
  <span title="sqlalchemy.String">String</span>,
  <span title="sqlalchemy.Text">Text</span>,
  <span title="sqlalchemy.create_engine">create_engine</span>,
  <span title="sqlalchemy.func">func</span>,
  <span title="sqlalchemy.event">event</span>,
  <span title="sqlalchemy.ext.associationproxy.association_proxy">association_proxy</span>,
  <span title="sqlalchemy.ext.hybrid.hybrid_property">hybrid_property</span>,
  <span title="sqlalchemy.orm.mapper">mapper</span>,
  <span title="sqlalchemy.orm.relationship">relationship</span>,
  <span title="sqlalchemy.orm.scoped_session">scoped_session</span>,
  <span title="sqlalchemy.orm.sessionmaker">sessionmaker</span>,
  <span title="sqlalchemy.orm.collections.attribute_mapped_collection">attribute_mapped_collection</span>,
  <span title="sqlalchemy.orm.exc.NoResultFound">NoResultFound</span>,
  <span title="sqlalchemy.orm.session.object_session">object_session</span>,
  <span title="sqlalchemy.orm.util.identity_key">identity_key</span>,
  <span title="sqlalchemy.sql.expression.literal">literal</span>,
  <span title="sqlalchemy.sql.expression.literal_column">literal_column</span>
</p><br />
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="init"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">init</span>(<span class="sig-arg">session_maker</span>,
        <span class="sig-arg">**kwargs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="multivac-pysrc.html#init">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Initialize the db connection, set up the tables and map the 
  classes.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>session_maker</code></strong> (sqlalchemy.orm.session.Session factory) - Session generator to bind to the model</li>
        <li><strong class="pname"><code>kwargs</code></strong> (dict) - Additional settings for the mapper</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="setup_mappers"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">setup_mappers</span>(<span class="sig-arg">**kwargs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="multivac-pysrc.html#setup_mappers">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Define the mapping between tables and classes, and the relationships 
  that link them.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>extra_mapping</code></strong> (dict) - Mapping between database tables and classes</li>
        <li><strong class="pname"><code>extra_properties</code></strong> (dict) - Dictionary of additional properties for a table</li>
        <li><strong class="pname"><code>extra_extensions</code></strong> (dict) - Dictionary of additional extensions for a table</li>
        <li><strong class="pname"><code>extra_kwargs</code></strong> (dict) - Dictionary of additional arguments for a mapper</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >multiVAC</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
